package homeword.Add_and_sub;

import java.util.WeakHashMap;

public class Sub implements Runnable{
    private Repository repository;

    public Sub(Repository repository) {
        this.repository = repository;
    }

    @Override
    public void run() {
        while (true){
            try {
                this.repository.sub();
                Thread.yield();
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
        }
    }

}
